The size_t type is defined in stdlib.h and is typically an unsigned long integer. The malloc() function returns a pointer to a block of memory of the desired size. This is a 'void' pointer, meaning that it may be assigned to a pointer of any type.
The number of bytes required is frequently determined using the 'sizeof' operator, which evaluates the number of bytes required by its operand. An example using the personnel_rec user-defined type discussed earlier* is: